package com.itheima.controller;
//import com.itheima.dao.Fly;
import com.itheima.dao.Fly;
import com.itheima.entity.Animal;
import org.springframework.stereotype.Repository;
import javax.annotation.Resource;

@Repository("animalcontroller")
public class AnimalController {
  private Animal animal;
  @Resource(name="fly")
   public Fly fly;
    public void run(String name,int quantity)
    {
        this.animal=new Animal(name,quantity);
        animal.statement();

    }

    public void begin(String name)
    {
        this.fly.begin(name);

    }

}
